package com.adgox.tiantianbiting.base;

import android.app.Activity;
import android.app.Notification;
import android.app.PendingIntent;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;

import android.os.Handler;
import android.os.Messenger;
import android.support.v7.app.AppCompatActivity;

import com.adgox.tiantianbiting.music.MusicService;

public class BaseMusicPlayerActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    protected void startMusicService(String option, String path, Activity activity) {
        Intent intentService = new Intent(activity, MusicService.class);
        intentService.putExtra("option", option);
        intentService.putExtra("messenger",new Messenger(new Handler()));
        intentService.putExtra("path", path);
        activity.startService(intentService);
    }
    protected void startMusicService(String option) {
        Intent intentService = new Intent(this, MusicService.class);
        intentService.putExtra("option", option);
        intentService.putExtra("messenger",new Messenger(new Handler()));
        startService(intentService);
    }
    protected void startMusicService(String option,int progress) {
        Intent intentService = new Intent(this, MusicService.class);
        intentService.putExtra("option", option);
        intentService.putExtra("progress",progress);
        intentService.putExtra("messenger",new Messenger(new Handler()));
        startService(intentService);
    }
}
